package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;

import com.blankj.utilcode.util.ToastUtils;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityPlayLinkBinding;
import stark.common.basic.event.EventStatProxy;

public class PlayLinkActivity extends BaseAc<ActivityPlayLinkBinding> {


    @Override
    protected int onCreate() {
        return R.layout.activity_play_link;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent5(this, mDataBinding.event5Container);
        mDataBinding.ivPlayLinkBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
        mDataBinding.tvPlayLink.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()){
            case R.id.tvPlayLink:
                String videoPath=mDataBinding.etVideoLink.getText().toString();
                if(TextUtils.isEmpty(videoPath)){
                    ToastUtils.showShort(getString(R.string.please_input_play_uri));
                }else{
                    PlayLocalActivity.videoPath=videoPath;
                    startActivity(PlayLocalActivity.class);
                }
        }
    }

    @Override
    protected void initData() {

    }

    @Override
    protected boolean isStatusBarTextDark() {
        return false;
    }
}